/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 artifact_prop_combat.h

	$Header: /heroes4/artifact_prop_combat.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ARTIFACT_PROP_COMBAT_H_INCLUDED )
#define ARTIFACT_PROP_COMBAT_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "artifact_prop_attack.h"
#include "artifact_prop_effect.h"

namespace t_artifact_prop
{
	// ----------------------------------------------------------------------
	// class for combat effects
	// ----------------------------------------------------------------------
	class t_combat : public t_artifact_effect, public t_attack
	{
	public:
		t_combat();
		void init( bool melee, bool ranged, t_artifact_target target, 
				   int amount = 0 );

		virtual bool accept( t_artifact_effect_visitor& visitor );
		virtual bool read( std::streambuf& buffer );
		virtual bool write( std::streambuf& stream ) const;
	};

	inline t_combat::t_combat()
	{
	}

	inline void t_combat::init( bool melee, bool ranged, t_artifact_target target, int amount )
	{
		t_artifact_effect::init( target, amount );
		m_affects_melee = melee;
		m_affects_ranged = ranged;
	}

	typedef t_effect< t_combat, k_artifact_effect_area >			t_area;
	typedef t_effect< t_combat, k_artifact_effect_defense >			t_defense;
	typedef t_effect< t_combat, k_artifact_effect_demonslayer >		t_demonslayer;
	typedef t_effect< t_combat, k_artifact_effect_extra_attack >	t_extra_attack;
	typedef t_effect< t_combat, k_artifact_effect_giantslayer >		t_giantslayer;
	typedef t_effect< t_combat, k_artifact_effect_soul_stealer>		t_soul_stealer;
	typedef t_effect< t_combat, k_artifact_effect_weapon >			t_weapon;
};

#endif // ARTIFACT_PROP_COMBAT_H_INCLUDED